package com.janwen.j2ee.jmx;

import java.lang.management.ManagementFactory;

import javax.management.MBeanServer;
import javax.management.ObjectName;

public class WebServerClient {

	
	public static void main(String[] args) throws Exception{
		WebServer webServer = new WebServer();
		MBeanServer mserver = ManagementFactory.getPlatformMBeanServer();
		mserver.registerMBean(webServer, new ObjectName("myapp:type=webserver,name=Port 8080"));
		Thread.sleep(10000000);
	}
}
